// 签名
import _bale from '../utils/package.js'
// 获取不同的接口地址
import { COMMON_API,AFTER_API } from '../config/index.js'
import { Service } from '../utils/server.js'
class ServiceModel extends Service {
  //获取售后列表
  getServiceList(params) {
     return this.postRequest(AFTER_API + '/return/selectRefund', {
      data: _bale('selectRefund', params)
    })
  }

  //获取售后详情
  getServiceDetail(params) {
    return this.postRequest(AFTER_API + '/return/selectRefundDetails', {
      data: _bale('selectRefundDetails', params)
    })
  }

  //提交寄回物流信息
  sendBack(params) {
    return this.postRequest(AFTER_API + '/return/sendBack', {
      data: _bale('sendBack', params)
    })
  }

  //撤销申请
  cancelRefund(params) {
    return this.postRequest(AFTER_API + '/return/revokeRefund', {
      data: _bale('revokeRefund', params)
    })
  }
}

export { ServiceModel }
